/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ifAssociados.java
 *
 * Created on 29/06/2010, 01:24:54
 */
package asfabdesk.apresentacao;

import asfabdesk.dominio.Associado;
import asfabdesk.dominio.CidadeUf;
import asfabdesk.dominio.Convenio;
import asfabdesk.dominio.ConvenioPorDependente;
import asfabdesk.dominio.Data;
import asfabdesk.dominio.Dependente;
import asfabdesk.dominio.Observacao;
import asfabdesk.presistencia.DAO;
import asfabdesk.util.RelatorioUtil;
import asfabdesk.util.Util;
import java.awt.Color;
import java.awt.Dimension;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Mathias
 */
public class TelaDependente extends javax.swing.JInternalFrame {

    public Associado associado = new Associado();
    public Dependente dependente = new Dependente();
    public File file;
    String caminho = TelaLogin.caminho_img;

    public TelaDependente(Associado associado) throws SQLException {
        initComponents();
        this.associado = associado;
        configurarTela();
    }

    public TelaDependente(Associado associado, Dependente dependente) throws SQLException {
        initComponents();
        this.associado = associado;
        this.dependente = dependente;
        configurarTelaEdicao();
    }

    private void configurarTela() throws SQLException {
        setTitle("Dependente de " + associado.getNome());
        txtSituacao.setText("Novo");
        configurarComboCidade();
        configurarBotoesCadastroNovo();
        configurarComboConvenios();
        setarDadosTitular();
    }

    private void configurarTelaEdicao() throws SQLException {
        setTitle("Dependente de " + associado.getNome());
        configurarComboCidade();
        configurarComboConvenios();
        setarDadosTitular();
        povoarCampos();
        atualizarTabelaObservacao();
        atualizarTabelaConvenios();
        configurarParaCadastroSalvo();
    }

    public void setarDadosTitular() {
        try {
            txtDependenteDe.setText(associado.getNome());
            txtRol.setText(String.valueOf(associado.getRol()));
            txtSecretaria.setText(associado.getSecretaria().getDescricao());
            txtCategoriaVinculo.setText(associado.getCategoriaVinculo().getDescricao());
            txtTelefone1Titular.setText(associado.getTel1());
            txtTelefone2Titular.setText(associado.getTel2());
            txtCelular1Titular.setText(associado.getCel1());
            txtCelular2Titular.setText(associado.getCel2());
            txtEmailTitular.setText(associado.getEmail());
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public String GerarRolDependente() {
        String rolDep;
        int qtdDeps = 0;
        List<Dependente> listaDeps = new DAO().listar(Dependente.class, "DependentesPorAssociado", associado);
        qtdDeps = listaDeps.size() + 1;
        rolDep = String.valueOf(associado.getRol()) + "." + qtdDeps;
        return rolDep;
    }

    public void configurarBotoesCadastroNovo() {
        btnEditar.setEnabled(false);
        btnImprimir.setEnabled(false);
        btnAtivaInativa.setEnabled(false);
        btnAdicionarObs.setEnabled(false);
        btnEditarObs.setEnabled(false);
        btnExcluirObs.setEnabled(false);
        btnContratarConvenio.setEnabled(false);
        btnFoto.setEnabled(false);
    }

    public void configurarParaCadastroSalvo() {
        Class classpath = new RelatorioUtil().getClass();
        URL url1 = classpath.getResource("/asfabdesk/apresentacao/resources/padlock_open_32x32.png");
        URL url2 = classpath.getResource("/asfabdesk/apresentacao/resources/linedpaperlock32.png");
        btnEditar.setEnabled(true);
        btnImprimir.setEnabled(true);
        btnAtivaInativa.setEnabled(true);
        btnAdicionarObs.setEnabled(true);
        btnContratarConvenio.setEnabled(true);
        btnFoto.setEnabled(true);
        if (dependente.isAtivo()) {
            txtSituacao.setText("Ativo");
            btnAtivaInativa.setText("Inativar");
            ImageIcon img = new ImageIcon(url1);
            btnAtivaInativa.setIcon(img);

        } else {
            txtSituacao.setText("Inativo");
            btnAtivaInativa.setText("Ativar");
            ImageIcon img = new ImageIcon(url2);
            btnAtivaInativa.setIcon(img);

        }
        txtRolDependente.setText(dependente.getRolDependente());
    }

    public void abrirIFrame(JInternalFrame janela) {
        for (JInternalFrame j : TelaPrincipal.desktop.getAllFrames()) {
            if (janela.getClass() == j.getClass()) {
                j.moveToFront();
                return;
            }
        }
        TelaPrincipal.desktop.add(janela);
        janela.setVisible(true);
    }

    public void configurarComboConvenios() throws SQLException {
        comboConvenios.removeAllItems();
        java.util.List convenios = (new DAO().listar(Convenio.class, "ConveniosPorStatus", true));
        for (int i = 0; i < convenios.size(); i++) {
            String conv = ((Convenio) convenios.get(i)).getNome();
            comboConvenios.addItem(conv);
        }
        comboConvenios.addItem("");
        comboConvenios.setSelectedItem("");
    }

    public void ativaInativa() {
        if (dependente.isAtivo()) {
            int resposta = JOptionPane.showConfirmDialog(null, "Realmente deseja Inativar o Dependente:" + dependente.getNome(), "Inativar ?", 0);
            if (resposta == 0) {
                try {
                    dependente.setAtivo(false);
                    new DAO().salvar(dependente);
                    JOptionPane.showMessageDialog(null, "Dependente:" + dependente.getNome() + " foi INATIVADO", "Inativado", 1);
                    configurarParaCadastroSalvo();
                } catch (Exception ex) {
                    ex.printStackTrace();
                    JOptionPane.showMessageDialog(null, "Ops, houve um erro na Inativação do Dependente", "Ops", 0);
                }
            }

        } else {
            int resposta = JOptionPane.showConfirmDialog(null, "Realmente deseja Ativar o Dependente:" + dependente.getNome(), "Ativar ?", 0);
            if (resposta == 0) {
                try {
                    dependente.setAtivo(true);
                    new DAO().salvar(dependente);
                    JOptionPane.showMessageDialog(null, "Dependente:" + dependente.getNome() + " foi ATIVADO", "Ativado", 1);
                    configurarParaCadastroSalvo();
                } catch (Exception ex) {
                    ex.printStackTrace();
                    JOptionPane.showMessageDialog(null, "Ops, houve um erro na Ativação do Dependente", "Ops", 0);
                }
            }
        }
    }

    public void salvarDependente() {
        String msgSucessoEdt = "Registro Alterado com Sucesso!";
        String msgSucessoCad = "Dependente Cadastrado com Sucesso!";
        String msgErroEdt = "Ops, houve um erro durante a alteração do Registro.";
        String msgErroCad = "Ops, houve um erro durante o cadastro do Dependente.";
        String sucesso;
        String erro;
        if (verificarCampos()) {
            if (verificarUniques()) {
                dependente = povoarDependente();
                if (dependente.getId() > 0) {
                    sucesso = msgSucessoEdt;
                    erro = msgErroEdt;
                } else {
                    sucesso = msgSucessoCad;
                    erro = msgErroCad;
                }
                try {
                    dependente = new DAO().salvar(dependente);
                    JOptionPane.showMessageDialog(null, sucesso, "Sucesso", 1);
                    configurarParaCadastroSalvo();

                } catch (Exception e) {
                    JOptionPane.showMessageDialog(null, erro, "Erro", 0);
                    e.printStackTrace();
                }
            }
        }
    }

    public boolean verificarCampos() {
        boolean retorno = true;
        StringBuffer campos = new StringBuffer();
        String campo = "";

        if (txtDataFiliacao.getText().equals("  /  /    ")) {
            campo = " (Data de Filiação) ";
            campos.append(campo);
            retorno = false;
        }
        if (txtNome.getText().equals("")) {
            campo = " (Nome) ";
            campos.append(campo);
            retorno = false;
        }

        if (comboSexo.getSelectedItem().toString().equals("")) {
            campo = " (Sexo) ";
            campos.append(campo);
            retorno = false;
        }

        if (txtNascimento.getText().equals("  /  /    ")) {
            campo = " (Data de Nascimento) ";
            campos.append(campo);
            retorno = false;
        }

        if (txtNomeMae.getText().equals("")) {
            campo = " (Nome da Mãe) ";
            campos.append(campo);
            retorno = false;
        }

        if (comboRelacaoTitular.getSelectedItem().toString().equals("")) {
            campo = " (Relação c/titular) ";
            campos.append(campo);
            retorno = false;
        }

        if (retorno == false) {
            JOptionPane.showMessageDialog(null, "Ops, você não preencheu o(s) seguinte(s) campo(s) obrigatório(s): " + '\n' + campos, "Campos Obrigatórios.", 2);
        }
        return retorno;
    }

    public boolean verificarUniques() {
        StringBuffer campos = new StringBuffer();
        String string = "";
        boolean retorno = true;

        if (txtCpf.getText().equals("")) {
        } else {
            if (new DAO().localizar(Associado.class, "DependentePorCpf", txtCpf.getText()) != null) {
                string = " (CPF= " + txtCpf.getText() + ") ";
                campos.append(string);
                retorno = false;
            }
        }

        if (txtIdentidade.getText().equals("")) {
        } else {
            if (new DAO().localizar(Associado.class, "DependentePorIdentidade", txtIdentidade.getText()) != null) {
                string = " (Identidade= " + txtIdentidade.getText() + ") ";
                campos.append(string);
                retorno = false;
            }
        }

        if (retorno == false) {
            JOptionPane.showMessageDialog(null, "Ops, você está tentando salvar campo(s) já cadastrado(s): " + '\n' + campos, "Campos Únicos.", 2);
        }
        return retorno;
    }

    public Dependente povoarDependente() {
        try {
            Dependente dep = new Dependente();
            dep.setRolDependente(GerarRolDependente());
            dep.setLocalizacaoFisica(txtLocFisica.getText());
            dep.setAssociado(associado);
            dep.setUsuarioCadastrante(TelaLogin.usuario);
            //Dados Pessoais ####################################
            dep.setDataFiliacao(new Data().ConverteDataStringDate(txtDataFiliacao.getText()));
            dep.setNome(txtNome.getText().toUpperCase());
            dep.setDataNasc(new Data().ConverteDataStringDate(txtNascimento.getText()));
            dep.setNacionalidade(txtNacionalidade.getText().toUpperCase());
            dep.setNaturalidade(txtNaturalidade.getText().toUpperCase());
            dep.setRg(txtIdentidade.getText());
            dep.setOrgaoExpedidor(txtOrgaoExepedidor.getText().toUpperCase());
            dep.setCpf(txtCpf.getText());
            dep.setTituloEleitor(txtTitulo.getText());
            dep.setZonaEleitoral(txtZona.getText());
            dep.setSecaoEleitoral(txtSecao.getText());
            dep.setNomeMae(txtNomeMae.getText().toUpperCase());
            dep.setNomePai(txtNomePai.getText().toUpperCase());
            //Contatos & Endereço #######################################
            dep.setLogradouro(txtLogradouro.getText().toUpperCase());
            dep.setNumeroEnd(txtNumero.getText());
            dep.setBairro(txtBairro.getText().toUpperCase());
            dep.setComplemento(txtComplemento.getText());
            CidadeUf cidade = new CidadeUf();
            cidade = (new DAO().localizar(CidadeUf.class, "RecuperarCidadeUf", comboUF.getSelectedItem().toString(), comboCidade.getSelectedItem().toString()));
            dep.setCidadeUf(cidade);
            dep.setCep(txtCep.getText());
            dep.setTel1(txtTelefone1.getText());
            dep.setTel2(txtTelefone2.getText());
            dep.setCel1(txtCelular1.getText());
            dep.setCel2(txtCelular2.getText());
            dep.setEmail(txtEmail.getText().toLowerCase());
            dep.setSexo(comboSexo.getSelectedItem().toString());
            dep.setRelacaoTitular(comboRelacaoTitular.getSelectedItem().toString());

            return dep;
        } catch (Exception e) {
            System.out.println("#####ERRO DURANTE O POVOAMENTO DO DEPENDENTE ############");
            return null;
        }
    }

    public void povoarAtualizacaoDependente() {
        try {

            dependente.setRolDependente(GerarRolDependente());
            dependente.setLocalizacaoFisica(txtLocFisica.getText());
            dependente.setAssociado(associado);
            dependente.setUsuarioCadastrante(TelaLogin.usuario);
            //Dados Pessoais ####################################
            dependente.setDataFiliacao(new Data().ConverteDataStringDate(txtDataFiliacao.getText()));
            dependente.setNome(txtNome.getText().toUpperCase());
            dependente.setDataNasc(new Data().ConverteDataStringDate(txtNascimento.getText()));
            dependente.setNacionalidade(txtNacionalidade.getText().toUpperCase());
            dependente.setNaturalidade(txtNaturalidade.getText().toUpperCase());
            dependente.setRg(txtIdentidade.getText());
            dependente.setOrgaoExpedidor(txtOrgaoExepedidor.getText().toUpperCase());
            dependente.setCpf(txtCpf.getText());
            dependente.setTituloEleitor(txtTitulo.getText());
            dependente.setZonaEleitoral(txtZona.getText());
            dependente.setSecaoEleitoral(txtSecao.getText());
            dependente.setNomeMae(txtNomeMae.getText().toUpperCase());
            dependente.setNomePai(txtNomePai.getText().toUpperCase());
            //Contatos & Endereço #######################################
            dependente.setLogradouro(txtLogradouro.getText().toUpperCase());
            dependente.setNumeroEnd(txtNumero.getText());
            dependente.setBairro(txtBairro.getText().toUpperCase());
            dependente.setComplemento(txtComplemento.getText());
            CidadeUf cidade = new CidadeUf();
            cidade = (new DAO().localizar(CidadeUf.class, "RecuperarCidadeUf", comboUF.getSelectedItem().toString(), comboCidade.getSelectedItem().toString()));
            dependente.setCidadeUf(cidade);
            dependente.setCep(txtCep.getText());
            dependente.setTel1(txtTelefone1.getText());
            dependente.setTel2(txtTelefone2.getText());
            dependente.setCel1(txtCelular1.getText());
            dependente.setCel2(txtCelular2.getText());
            dependente.setEmail(txtEmail.getText().toLowerCase());
            dependente.setSexo(comboSexo.getSelectedItem().toString());
            dependente.setRelacaoTitular(comboRelacaoTitular.getSelectedItem().toString());

        } catch (Exception e) {
            System.out.println("#####ERRO DURANTE O POVOAMENTO DE ATUALIZAÇÃO DO DEPENDENTE ############");

        }
    }

    public void limparCampos() {
        txtRolDependente.setText("");
        txtSituacao.setText("");
        txtDataFiliacao.setText("");
        txtNome.setText("");
        txtNascimento.setText("");
        txtNacionalidade.setText("");
        txtNaturalidade.setText("");
        txtIdentidade.setText("");
        txtOrgaoExepedidor.setText("");
        txtCpf.setText("");
        txtTitulo.setText("");
        txtZona.setText("");
        txtSecao.setText("");
        txtNomeMae.setText("");
        txtNomePai.setText("");
        txtLogradouro.setText("");
        txtNumero.setText("");
        txtBairro.setText("");
        txtComplemento.setText("");
        txtCep.setText("");
        txtTelefone1.setText("");
        txtTelefone2.setText("");
        txtCelular1.setText("");
        txtCelular2.setText("");
        txtEmail.setText("");
        txtDependenteDe.setText("");
        comboSexo.setSelectedItem("");
        comboRelacaoTitular.setSelectedItem("");

    }

    public void povoarCampos() {
        carregarFotos();
        txtRolDependente.setText(dependente.getRolDependente().toString());
        if (dependente.isAtivo()) {
            txtSituacao.setText("Ativo");
        } else {
            txtSituacao.setText("Inativo");
        }
        txtDataFiliacao.setText(new Data().ConverteDataDateStringBra(dependente.getDataFiliacao()));
        txtNome.setText(dependente.getNome());
        txtNascimento.setText(new Data().ConverteDataDateStringBra(dependente.getDataNasc()));
        txtNacionalidade.setText(dependente.getNacionalidade());
        txtNaturalidade.setText(dependente.getNaturalidade());
        txtIdentidade.setText(dependente.getRg());
        txtOrgaoExepedidor.setText(dependente.getOrgaoExpedidor());
        txtCpf.setText(dependente.getCpf());
        txtTitulo.setText(dependente.getTituloEleitor());
        txtZona.setText(dependente.getZonaEleitoral());
        txtSecao.setText(dependente.getSecaoEleitoral());
        txtNomeMae.setText(dependente.getNomeMae());
        txtNomePai.setText(dependente.getNomePai());
        txtLogradouro.setText(dependente.getLogradouro());
        txtNumero.setText(dependente.getNumeroEnd());
        txtBairro.setText(dependente.getBairro());
        txtComplemento.setText(dependente.getComplemento());
        try {
            comboUF.setSelectedItem(dependente.getCidadeUf().getUf());
            comboCidade.setSelectedItem(dependente.getCidadeUf().getCidade());
        } catch (Exception ex) {
        }
        txtCep.setText(dependente.getBairro());
        txtTelefone1.setText(dependente.getTel1());
        txtTelefone2.setText(dependente.getTel2());
        txtCelular1.setText(dependente.getCel1());
        txtCelular2.setText(dependente.getCel2());
        txtEmail.setText(dependente.getEmail());
        txtLocFisica.setText(dependente.getLocalizacaoFisica());
        comboSexo.setSelectedItem(dependente.getSexo());
        comboRelacaoTitular.setSelectedItem(dependente.getRelacaoTitular());


    }

    public boolean adicionarObservacao() {
        if (txtObservacao.getText().length() < 10) {
            JOptionPane.showMessageDialog(null, "Ops, a observação não pode ter menos de 10 caractéres! ", "Atenção.", 2);
            return false;
        }
        Date data = new Date();
        String dataString = (String) new Data().ConverteDataHoraDateStringBra(data);
        try {
            data = new Data().ConverteDataHoraStringDate(dataString);
        } catch (ParseException ex) {
            Logger.getLogger(TelaDependente.class.getName()).log(Level.SEVERE, null, ex);
        }
        Observacao obs = new Observacao();
        obs.setTextoObs(txtObservacao.getText());
        obs.setDependente(dependente);
        obs.setTipoObs("dependente");
        obs.setDataRegistro(data);
        obs.setUsuarioCadastrante(TelaLogin.usuario);
        try {
            new DAO().salvar(obs);
            JOptionPane.showMessageDialog(null, "Observação adicionada com sucesso! ", "Atenção.", 1);
            txtObservacao.setText("");
            atualizarTabelaObservacao();
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            JOptionPane.showMessageDialog(null, "Ops, ocorreu um erro no cadastro desta observação! ", "Atenção.", 0);
            return false;
        }
    }

    public void configurarComboCidade() throws SQLException {
        comboCidade.removeAllItems();
        java.util.List cidades = (new DAO().listar(CidadeUf.class, "CidadePorUf", comboUF.getSelectedItem().toString()));
        for (int i = 0; i < cidades.size(); i++) {
            String cidade = ((CidadeUf) cidades.get(i)).getCidade();
            comboCidade.addItem(cidade);
        }
        comboCidade.addItem("");
        comboCidade.setSelectedItem("");
    }

    private void atualizarTabelaObservacao() {
        try {
            List<Observacao> observacoes = new DAO().listar(Observacao.class, "ObservacoesPorDependente", dependente);
            tabelaObservacao.setModel(new ModeloObservacao(observacoes));
            btnEditarObs.setEnabled(false);
            btnExcluirObs.setEnabled(false);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private class ModeloObservacao extends DefaultTableModel {

        private List<Observacao> lista;
        private String[] campos = new String[]{"Id", "Data", "Observação", "Usuário"};

        public ModeloObservacao(List<Observacao> list) {
            lista = list;
        }

        public ModeloObservacao() {
        }

        public Observacao getObservacao(int index) {
            return lista.get(index);
        }

        @Override
        public boolean isCellEditable(int row, int column) {
            return false;
        }

        @Override
        public Object getValueAt(int row, int column) {
            Observacao observacao = lista.get(row);


            switch (column) {
                case 0:
                    return observacao.getId();

                case 1:
                    return observacao.getDataRegistro();

                case 2:
                    return observacao.getTextoObs();

                case 3:
                    return observacao.getUsuarioCadastrante().getNome();

                default:
                    return null;
            }
        }

        @Override
        public int getRowCount() {
            return lista == null ? 0 : lista.size();
        }

        @Override
        public int getColumnCount() {
            return campos.length;
        }

        @Override
        public String getColumnName(int column) {
            return campos[column];
        }
    }

    public void selecionarObservacao() {
        btnEditarObs.setEnabled(true);
        btnExcluirObs.setEnabled(true);
        Observacao observacao = (((ModeloObservacao) tabelaObservacao.getModel()).getObservacao(tabelaObservacao.getSelectedRow()));
        txtObservacao.setText(observacao.getTextoObs());
        txtObservacao.setEditable(false);
        txtObservacao.setBackground(Color.lightGray);
        btnAdicionarObs.setText("Novo");
    }

    public void ExcluirObservacao() {
        Observacao observacao = (((ModeloObservacao) tabelaObservacao.getModel()).getObservacao(tabelaObservacao.getSelectedRow()));
        int resposta = JOptionPane.showConfirmDialog(null, "Realmente deseja excluir esta observação ?", "Excluir Obs?", 0);
        if (resposta == 0) {
            try {
                new DAO().remover(observacao);
                atualizarTabelaObservacao();
                JOptionPane.showMessageDialog(null, "A Observação foi excluida com Suceso!.", "Excluida", 1);
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(null, "Ops, houve um erro durante a exclusão desta Observação.", "Erro", 0);
                ex.printStackTrace();
            }
        }
    }

    public boolean EditarObservacao() {
        Observacao obs = (((ModeloObservacao) tabelaObservacao.getModel()).getObservacao(tabelaObservacao.getSelectedRow()));
        if (txtObservacao.getText().length() < 10) {
            JOptionPane.showMessageDialog(null, "Ops, a observação não pode ter menos de 10 caractéres! ", "Atenção.", 2);
            return false;
        }
        Date data = new Date();
        String dataString = (String) new Data().ConverteDataHoraDateStringBra(data);
        try {
            data = new Data().ConverteDataHoraStringDate(dataString);
        } catch (ParseException ex) {
            Logger.getLogger(TelaDependente.class.getName()).log(Level.SEVERE, null, ex);
        }
        obs.setDataRegistro(data);
        obs.setTextoObs(txtObservacao.getText());
        // lembrar de setar o usuário cadastrante
        int resposta = JOptionPane.showConfirmDialog(null, "Realmente deseja alterar esta observação ?", "Editar Obs?", 0);
        if (resposta == 0) {
            try {
                new DAO().salvar(obs);
                atualizarTabelaObservacao();
                JOptionPane.showMessageDialog(null, "A Observação foi alterada com Suceso!.", "Excluida", 1);
                txtObservacao.setText("");
                btnAdicionarObs.setText("Salvar");
                return true;
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(null, "Ops, houve um erro durante a alteração desta Observação.", "Erro", 0);
                ex.printStackTrace();
            }
        }
        return false;
    }

    public void AcoesBtnAdicionarObservacao() {
        if (btnAdicionarObs.getText().equals("Adicionar")) {
            adicionarObservacao();
        } else if (btnAdicionarObs.getText().equals("Novo")) {
            atualizarTabelaObservacao();
            txtObservacao.setText("");
            txtObservacao.setEditable(true);
            txtObservacao.setBackground(Color.white);
            btnAdicionarObs.setText("Adicionar");
        } else if (btnAdicionarObs.getText().equals("Alterar")) {
            EditarObservacao();
        }
    }

    private void chamarAdesaoConvenio() {
        ConvenioPorDependente conv = new ConvenioPorDependente();
        Convenio convenio = new DAO().localizar(Convenio.class, "ConvenioPorNome", comboConvenios.getSelectedItem().toString());
        conv.setConvenio(convenio);
        conv.setDependente(dependente);
        Date data = new Date();
        conv.setDataRegistro(data);
        conv.setUsuarioCadastrante(TelaLogin.usuario);
        TelaAdesaoConvenio ac = new TelaAdesaoConvenio(conv);
        FrameListenerConvenios fl = new FrameListenerConvenios();
        ac.addInternalFrameListener(fl);
        abrirIFrame(ac);
    }

    private class FrameListenerConvenios implements InternalFrameListener {

        public void internalFrameClosed(InternalFrameEvent e) {
            atualizarTabelaConvenios();
        }

        public void internalFrameOpened(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameClosing(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameIconified(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameDeiconified(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameActivated(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameDeactivated(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }
    }

    private void atualizarTabelaConvenios() {
        try {
            List<ConvenioPorDependente> convDep = new DAO().listar(ConvenioPorDependente.class, "ConveniosPorDependente", dependente);
            TabelaConveniosContratados.setModel(new ModeloConvenioPorDependente(convDep));

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private class ModeloConvenioPorDependente extends DefaultTableModel {

        private List<ConvenioPorDependente> lista;
        private String[] campos = new String[]{"Convênio", "Empresa", "Inicio", "Usuário"};

        public ModeloConvenioPorDependente(List<ConvenioPorDependente> list) {
            lista = list;
        }

        public ModeloConvenioPorDependente() {
        }

        public ConvenioPorDependente getConvenio(int index) {
            return lista.get(index);
        }

        @Override
        public boolean isCellEditable(int row, int column) {
            return false;
        }

        @Override
        public Object getValueAt(int row, int column) {
            ConvenioPorDependente convenio = lista.get(row);


            switch (column) {
                case 0:
                    return convenio.getConvenio().getNome();

                case 1:
                    return convenio.getConvenio().getEmpresa().getNomeFantasia();
                case 2:
                    return convenio.getDataRegistro();

                case 3:
                    return convenio.getUsuarioCadastrante().getNome();

                default:
                    return null;
            }
        }

        @Override
        public int getRowCount() {
            return lista == null ? 0 : lista.size();
        }

        @Override
        public int getColumnCount() {
            return campos.length;
        }

        @Override
        public String getColumnName(int column) {
            return campos[column];
        }
    }

    public void salvarFoto(String path) throws IOException {
        File fileOriginal = new File(path);
        File fileTratado = null;
        fileTratado = new File(Util.salvarArquivo(caminho, fileOriginal, null));
        byte[] img = Util.getBytesFromFile(fileTratado);

        try {
            dependente.setFoto(img);
            new DAO().salvar(dependente);
            JOptionPane.showMessageDialog(null, "Nova foto salva com Sucesso.", "Sucesso", 1);
        } catch (Exception ex) {
            System.out.println("Erro ao Salvar a foto heim: " + ex.getMessage());
        }
        fileOriginal.deleteOnExit();
        fileTratado.deleteOnExit();
    }

    public void carregarFotos() {
        try {

            File img = Util.getFileFromBytes(dependente.getFoto(), String.valueOf(dependente.getRolDependente()));
            String realPath = Util.salvarArquivo(caminho, img, new Dimension(160, 213));
            ImageIcon foto = new ImageIcon(realPath);
            lblFoto.setIcon(foto);
            file = new File(realPath);
            file.deleteOnExit();
            img.deleteOnExit();

        } catch (Exception ex) {
            System.out.println("Erro ao carregar a foto: " + ex.getMessage());
            ex.printStackTrace();
        }
    }

    public void procurarFoto() {
        TelaBuscarFoto bf = new TelaBuscarFoto();
        FrameListenerProcuraFoto fl = new FrameListenerProcuraFoto();
        bf.addInternalFrameListener(fl);
        abrirIFrame(bf);
    }

    private class FrameListenerProcuraFoto implements InternalFrameListener {

        public void internalFrameClosed(InternalFrameEvent e) {
            File foto = TelaBuscarFoto.fc.getSelectedFile();
            if (foto != null) {
                try {
                    salvarFoto(foto.getAbsolutePath());
                    carregarFotos();
                } catch (Exception ex) {
                    System.out.println("ERRO AO CARREGAR A FOTO: " + ex.getMessage());
                }
            }

        }

        public void internalFrameOpened(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameClosing(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameIconified(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameDeiconified(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameActivated(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }

        public void internalFrameDeactivated(InternalFrameEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        PainelPrincipal = new javax.swing.JPanel();
        tbDadosDoAssociado = new javax.swing.JTabbedPane();
        abDadosPessoais = new javax.swing.JPanel();
        txtNome = new javax.swing.JTextField();
        txtOrgaoExepedidor = new javax.swing.JTextField();
        txtNacionalidade = new javax.swing.JTextField();
        txtNaturalidade = new javax.swing.JTextField();
        txtIdentidade = new javax.swing.JTextField();
        txtTitulo = new javax.swing.JTextField();
        txtZona = new javax.swing.JTextField();
        txtSecao = new javax.swing.JTextField();
        txtNomeMae = new javax.swing.JTextField();
        txtNomePai = new javax.swing.JTextField();
        txtNascimento = new javax.swing.JFormattedTextField();
        txtCpf = new javax.swing.JFormattedTextField();
        jPanel6 = new javax.swing.JPanel();
        comboSexo = new javax.swing.JComboBox();
        abEnderecoContatos = new javax.swing.JPanel();
        painelEndereco = new javax.swing.JPanel();
        txtLogradouro = new javax.swing.JTextField();
        txtNumero = new javax.swing.JTextField();
        txtBairro = new javax.swing.JTextField();
        txtComplemento = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        comboCidade = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        comboUF = new javax.swing.JComboBox();
        txtCep = new javax.swing.JFormattedTextField();
        painelContatos = new javax.swing.JPanel();
        txtEmail = new javax.swing.JTextField();
        txtTelefone1 = new javax.swing.JFormattedTextField();
        txtTelefone2 = new javax.swing.JFormattedTextField();
        txtCelular1 = new javax.swing.JFormattedTextField();
        txtCelular2 = new javax.swing.JFormattedTextField();
        abInfo = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtObservacao = new javax.swing.JTextArea();
        jScrollPane6 = new javax.swing.JScrollPane();
        tabelaObservacao = new javax.swing.JTable();
        btnEditarObs = new javax.swing.JButton();
        btnExcluirObs = new javax.swing.JButton();
        btnAdicionarObs = new javax.swing.JButton();
        abConvenios = new javax.swing.JPanel();
        abConvenios1 = new javax.swing.JPanel();
        comboConvenios = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        btnContratarConvenio = new javax.swing.JButton();
        scrollConveniosContratados = new javax.swing.JScrollPane();
        TabelaConveniosContratados = new javax.swing.JTable();
        jLabel37 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        abTitular = new javax.swing.JPanel();
        txtDependenteDe = new javax.swing.JTextField();
        painelContatos1 = new javax.swing.JPanel();
        txtTelefone1Titular = new javax.swing.JTextField();
        txtEmailTitular = new javax.swing.JTextField();
        txtTelefone2Titular = new javax.swing.JTextField();
        txtCelular1Titular = new javax.swing.JTextField();
        txtCelular2Titular = new javax.swing.JTextField();
        txtRol = new javax.swing.JTextField();
        txtSecretaria = new javax.swing.JTextField();
        txtCategoriaVinculo = new javax.swing.JTextField();
        jPanel7 = new javax.swing.JPanel();
        comboRelacaoTitular = new javax.swing.JComboBox();
        abHistorico = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        pnEsquerdo = new javax.swing.JPanel();
        txtRolDependente = new javax.swing.JTextField();
        txtSituacao = new javax.swing.JTextField();
        lblFoto = new javax.swing.JLabel();
        txtDataFiliacao = new javax.swing.JFormattedTextField();
        txtLocFisica = new javax.swing.JFormattedTextField();
        btnFoto = new javax.swing.JButton();
        bfInferior = new javax.swing.JToolBar();
        btnSalvar = new javax.swing.JButton();
        btnEditar = new javax.swing.JButton();
        btnAtivaInativa = new javax.swing.JButton();
        btnImprimir = new javax.swing.JButton();

        setClosable(true);
        setIconifiable(true);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(asfabdesk.apresentacao.AsfabDeskApp.class).getContext().getResourceMap(TelaDependente.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setMaximumSize(null);
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(700, 500));
        try {
            setSelected(true);
        } catch (java.beans.PropertyVetoException e1) {
            e1.printStackTrace();
        }
        setVisible(true);

        PainelPrincipal.setBackground(resourceMap.getColor("PainelPrincipal.background")); // NOI18N
        PainelPrincipal.setMaximumSize(null);
        PainelPrincipal.setName("PainelPrincipal"); // NOI18N

        tbDadosDoAssociado.setBackground(resourceMap.getColor("tbDadosDoAssociado.background")); // NOI18N
        tbDadosDoAssociado.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);
        tbDadosDoAssociado.setMaximumSize(null);
        tbDadosDoAssociado.setName("tbDadosDoAssociado"); // NOI18N

        abDadosPessoais.setBackground(resourceMap.getColor("abDadosPessoais.background")); // NOI18N
        abDadosPessoais.setName("abDadosPessoais"); // NOI18N

        txtNome.setFont(resourceMap.getFont("txtNome.font")); // NOI18N
        txtNome.setForeground(resourceMap.getColor("txtNome.foreground")); // NOI18N
        txtNome.setText(resourceMap.getString("txtNome.text")); // NOI18N
        txtNome.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNome.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNome.border.titleFont"), resourceMap.getColor("txtNome.border.titleColor"))); // NOI18N
        txtNome.setMaximumSize(null);
        txtNome.setMinimumSize(null);
        txtNome.setName("txtNome"); // NOI18N
        txtNome.setOpaque(false);

        txtOrgaoExepedidor.setFont(resourceMap.getFont("txtOrgaoExepedidor.font")); // NOI18N
        txtOrgaoExepedidor.setText(resourceMap.getString("txtOrgaoExepedidor.text")); // NOI18N
        txtOrgaoExepedidor.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtOrgaoExepedidor.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtOrgaoExepedidor.border.titleFont"), resourceMap.getColor("txtOrgaoExepedidor.border.titleColor"))); // NOI18N
        txtOrgaoExepedidor.setMaximumSize(null);
        txtOrgaoExepedidor.setName("txtOrgaoExepedidor"); // NOI18N
        txtOrgaoExepedidor.setOpaque(false);

        txtNacionalidade.setFont(resourceMap.getFont("txtNacionalidade.font")); // NOI18N
        txtNacionalidade.setText(resourceMap.getString("txtNacionalidade.text")); // NOI18N
        txtNacionalidade.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNacionalidade.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNacionalidade.border.titleFont"), resourceMap.getColor("txtNacionalidade.border.titleColor"))); // NOI18N
        txtNacionalidade.setName("txtNacionalidade"); // NOI18N
        txtNacionalidade.setOpaque(false);

        txtNaturalidade.setText(resourceMap.getString("txtNaturalidade.text")); // NOI18N
        txtNaturalidade.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNaturalidade.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNaturalidade.border.titleFont"), resourceMap.getColor("txtNaturalidade.border.titleColor"))); // NOI18N
        txtNaturalidade.setMaximumSize(null);
        txtNaturalidade.setName("txtNaturalidade"); // NOI18N
        txtNaturalidade.setOpaque(false);

        txtIdentidade.setFont(resourceMap.getFont("txtIdentidade.font")); // NOI18N
        txtIdentidade.setText(resourceMap.getString("txtIdentidade.text")); // NOI18N
        txtIdentidade.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtIdentidade.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtIdentidade.border.titleColor"))); // NOI18N
        txtIdentidade.setMaximumSize(null);
        txtIdentidade.setName("txtIdentidade"); // NOI18N
        txtIdentidade.setOpaque(false);

        txtTitulo.setFont(resourceMap.getFont("txtTitulo.font")); // NOI18N
        txtTitulo.setText(resourceMap.getString("txtTitulo.text")); // NOI18N
        txtTitulo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtTitulo.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtTitulo.border.titleFont"), resourceMap.getColor("txtTitulo.border.titleColor"))); // NOI18N
        txtTitulo.setMaximumSize(null);
        txtTitulo.setMinimumSize(null);
        txtTitulo.setName("txtTitulo"); // NOI18N
        txtTitulo.setOpaque(false);

        txtZona.setFont(resourceMap.getFont("txtZona.font")); // NOI18N
        txtZona.setText(resourceMap.getString("txtZona.text")); // NOI18N
        txtZona.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtZona.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtZona.border.titleFont"), resourceMap.getColor("txtZona.border.titleColor"))); // NOI18N
        txtZona.setMaximumSize(null);
        txtZona.setMinimumSize(null);
        txtZona.setName("txtZona"); // NOI18N
        txtZona.setOpaque(false);

        txtSecao.setFont(resourceMap.getFont("txtSecao.font")); // NOI18N
        txtSecao.setText(resourceMap.getString("txtSecao.text")); // NOI18N
        txtSecao.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtSecao.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtSecao.border.titleFont"), resourceMap.getColor("txtSecao.border.titleColor"))); // NOI18N
        txtSecao.setMaximumSize(null);
        txtSecao.setMinimumSize(null);
        txtSecao.setName("txtSecao"); // NOI18N
        txtSecao.setOpaque(false);

        txtNomeMae.setFont(resourceMap.getFont("txtNomeMae.font")); // NOI18N
        txtNomeMae.setText(resourceMap.getString("txtNomeMae.text")); // NOI18N
        txtNomeMae.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNomeMae.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNomeMae.border.titleFont"), resourceMap.getColor("txtNomeMae.border.titleColor"))); // NOI18N
        txtNomeMae.setName("txtNomeMae"); // NOI18N
        txtNomeMae.setOpaque(false);

        txtNomePai.setFont(resourceMap.getFont("txtNomePai.font")); // NOI18N
        txtNomePai.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNomePai.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNomePai.border.titleFont"), resourceMap.getColor("txtNomePai.border.titleColor"))); // NOI18N
        txtNomePai.setName("txtNomePai"); // NOI18N
        txtNomePai.setOpaque(false);

        txtNascimento.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNascimento.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNascimento.border.titleFont"), resourceMap.getColor("txtNascimento.border.titleColor"))); // NOI18N
        try {
            txtNascimento.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtNascimento.setText(resourceMap.getString("txtNascimento.text")); // NOI18N
        txtNascimento.setMaximumSize(null);
        txtNascimento.setMinimumSize(null);
        txtNascimento.setName("txtNascimento"); // NOI18N
        txtNascimento.setOpaque(false);

        txtCpf.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCpf.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtCpf.border.titleFont"), resourceMap.getColor("txtCpf.border.titleColor"))); // NOI18N
        try {
            txtCpf.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtCpf.setName("txtCpf"); // NOI18N

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel6.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel6.border.titleColor"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setOpaque(false);

        comboSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "F", "M" }));
        comboSexo.setBorder(null);
        comboSexo.setMinimumSize(new java.awt.Dimension(49, 48));
        comboSexo.setName("comboSexo"); // NOI18N
        comboSexo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboSexoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(comboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(comboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout abDadosPessoaisLayout = new javax.swing.GroupLayout(abDadosPessoais);
        abDadosPessoais.setLayout(abDadosPessoaisLayout);
        abDadosPessoaisLayout.setHorizontalGroup(
            abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                        .addComponent(txtNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtNacionalidade, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtNaturalidade, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
                    .addComponent(txtNomeMae, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE)
                    .addComponent(txtNomePai, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE)
                    .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                        .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                                .addComponent(txtTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtZona, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                                .addComponent(txtIdentidade, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtOrgaoExepedidor, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtCpf, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(txtSecao, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, abDadosPessoaisLayout.createSequentialGroup()
                        .addComponent(txtNome, javax.swing.GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        abDadosPessoaisLayout.setVerticalGroup(
            abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abDadosPessoaisLayout.createSequentialGroup()
                .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel6, 0, 49, Short.MAX_VALUE)
                    .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtNacionalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtNaturalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtIdentidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtOrgaoExepedidor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtSecao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(abDadosPessoaisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(txtTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtZona, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtNomeMae, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtNomePai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(70, 70, 70))
        );

        tbDadosDoAssociado.addTab("Dados Pessoais", abDadosPessoais);

        abEnderecoContatos.setBackground(resourceMap.getColor("abEnderecoContatos.background")); // NOI18N
        abEnderecoContatos.setName("abEnderecoContatos"); // NOI18N

        painelEndereco.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("painelEndereco.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("painelEndereco.border.titleFont"), resourceMap.getColor("painelEndereco.border.titleColor"))); // NOI18N
        painelEndereco.setName("painelEndereco"); // NOI18N
        painelEndereco.setOpaque(false);

        txtLogradouro.setBackground(resourceMap.getColor("txtLogradouro.background")); // NOI18N
        txtLogradouro.setFont(resourceMap.getFont("txtLogradouro.font")); // NOI18N
        txtLogradouro.setText(resourceMap.getString("txtLogradouro.text")); // NOI18N
        txtLogradouro.setAutoscrolls(false);
        txtLogradouro.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtLogradouro.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtLogradouro.border.titleFont"), resourceMap.getColor("txtLogradouro.border.titleColor"))); // NOI18N
        txtLogradouro.setName("txtLogradouro"); // NOI18N
        txtLogradouro.setOpaque(false);

        txtNumero.setFont(resourceMap.getFont("txtNumero.font")); // NOI18N
        txtNumero.setText(resourceMap.getString("txtNumero.text")); // NOI18N
        txtNumero.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtNumero.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtNumero.border.titleFont"), resourceMap.getColor("txtNumero.border.titleColor"))); // NOI18N
        txtNumero.setName("txtNumero"); // NOI18N
        txtNumero.setOpaque(false);

        txtBairro.setFont(resourceMap.getFont("txtBairro.font")); // NOI18N
        txtBairro.setText(resourceMap.getString("txtBairro.text")); // NOI18N
        txtBairro.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtBairro.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtBairro.border.titleFont"), resourceMap.getColor("txtBairro.border.titleColor"))); // NOI18N
        txtBairro.setName("txtBairro"); // NOI18N
        txtBairro.setOpaque(false);

        txtComplemento.setFont(resourceMap.getFont("txtComplemento.font")); // NOI18N
        txtComplemento.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtComplemento.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtComplemento.border.titleFont"), resourceMap.getColor("txtComplemento.border.titleColor"))); // NOI18N
        txtComplemento.setName("txtComplemento"); // NOI18N
        txtComplemento.setOpaque(false);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel3.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel3.border.titleColor"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setOpaque(false);

        comboCidade.setBorder(null);
        comboCidade.setName("comboCidade"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(comboCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(comboCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel4.border.titleColor"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setOpaque(false);

        comboUF.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ES", "MG", "RJ", "SP" }));
        comboUF.setSelectedIndex(2);
        comboUF.setBorder(null);
        comboUF.setMinimumSize(new java.awt.Dimension(49, 48));
        comboUF.setName("comboUF"); // NOI18N
        comboUF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboUFActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(comboUF, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(comboUF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        txtCep.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCep.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtCep.border.titleFont"), resourceMap.getColor("txtCep.border.titleColor"))); // NOI18N
        try {
            txtCep.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtCep.setName("txtCep"); // NOI18N

        javax.swing.GroupLayout painelEnderecoLayout = new javax.swing.GroupLayout(painelEndereco);
        painelEndereco.setLayout(painelEnderecoLayout);
        painelEnderecoLayout.setHorizontalGroup(
            painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, painelEnderecoLayout.createSequentialGroup()
                .addComponent(txtComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtCep, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(painelEnderecoLayout.createSequentialGroup()
                .addComponent(txtLogradouro, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtBairro, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE))
        );
        painelEnderecoLayout.setVerticalGroup(
            painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelEnderecoLayout.createSequentialGroup()
                .addGroup(painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtLogradouro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(painelEnderecoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtComplemento, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, 0, 53, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCep, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        painelContatos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("painelContatos.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("painelContatos.border.titleFont"), resourceMap.getColor("painelContatos.border.titleColor"))); // NOI18N
        painelContatos.setName("painelContatos"); // NOI18N
        painelContatos.setOpaque(false);

        txtEmail.setFont(resourceMap.getFont("txtEmail.font")); // NOI18N
        txtEmail.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtEmail.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtEmail.border.titleFont"), resourceMap.getColor("txtEmail.border.titleColor"))); // NOI18N
        txtEmail.setName("txtEmail"); // NOI18N
        txtEmail.setOpaque(false);

        txtTelefone1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtTelefone1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtTelefone1.border.titleFont"), resourceMap.getColor("txtTelefone1.border.titleColor"))); // NOI18N
        try {
            txtTelefone1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtTelefone1.setName("txtTelefone1"); // NOI18N

        txtTelefone2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtTelefone2.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtTelefone2.border.titleColor"))); // NOI18N
        try {
            txtTelefone2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtTelefone2.setName("txtTelefone2"); // NOI18N

        txtCelular1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCelular1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtCelular1.border.titleFont"), resourceMap.getColor("txtCelular1.border.titleColor"))); // NOI18N
        try {
            txtCelular1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtCelular1.setName("txtCelular1"); // NOI18N

        txtCelular2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCelular2.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtCelular2.border.titleFont"), resourceMap.getColor("txtCelular2.border.titleColor"))); // NOI18N
        try {
            txtCelular2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtCelular2.setName("txtCelular2"); // NOI18N

        javax.swing.GroupLayout painelContatosLayout = new javax.swing.GroupLayout(painelContatos);
        painelContatos.setLayout(painelContatosLayout);
        painelContatosLayout.setHorizontalGroup(
            painelContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelContatosLayout.createSequentialGroup()
                .addComponent(txtTelefone1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtTelefone2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtCelular1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtCelular2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(txtEmail, javax.swing.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE)
        );
        painelContatosLayout.setVerticalGroup(
            painelContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelContatosLayout.createSequentialGroup()
                .addGroup(painelContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtTelefone1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtTelefone2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtCelular1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtCelular2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout abEnderecoContatosLayout = new javax.swing.GroupLayout(abEnderecoContatos);
        abEnderecoContatos.setLayout(abEnderecoContatosLayout);
        abEnderecoContatosLayout.setHorizontalGroup(
            abEnderecoContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abEnderecoContatosLayout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(painelEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(abEnderecoContatosLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(painelContatos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        abEnderecoContatosLayout.setVerticalGroup(
            abEnderecoContatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abEnderecoContatosLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(painelEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(painelContatos, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        tbDadosDoAssociado.addTab("Endereço/Contatos", abEnderecoContatos);

        abInfo.setBackground(resourceMap.getColor("abInfo.background")); // NOI18N
        abInfo.setName("abInfo"); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel5.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel5.border.titleColor"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setOpaque(false);

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        txtObservacao.setColumns(20);
        txtObservacao.setFont(resourceMap.getFont("txtObservacao.font")); // NOI18N
        txtObservacao.setLineWrap(true);
        txtObservacao.setRows(5);
        txtObservacao.setBorder(null);
        txtObservacao.setName("txtObservacao"); // NOI18N
        jScrollPane3.setViewportView(txtObservacao);

        jScrollPane6.setName("jScrollPane6"); // NOI18N

        tabelaObservacao.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Id", "Data", "Observação", "Usuário"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabelaObservacao.setName("tabelaObservacao"); // NOI18N
        tabelaObservacao.setSelectionBackground(resourceMap.getColor("tabelaObservacao.selectionBackground")); // NOI18N
        tabelaObservacao.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tabelaObservacao.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabelaObservacaoMouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(tabelaObservacao);

        btnEditarObs.setText(resourceMap.getString("btnEditarObs.text")); // NOI18N
        btnEditarObs.setEnabled(false);
        btnEditarObs.setName("btnEditarObs"); // NOI18N
        btnEditarObs.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditarObsActionPerformed(evt);
            }
        });

        btnExcluirObs.setText(resourceMap.getString("btnExcluirObs.text")); // NOI18N
        btnExcluirObs.setEnabled(false);
        btnExcluirObs.setName("btnExcluirObs"); // NOI18N
        btnExcluirObs.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExcluirObsActionPerformed(evt);
            }
        });

        btnAdicionarObs.setText(resourceMap.getString("btnAdicionarObs.text")); // NOI18N
        btnAdicionarObs.setEnabled(false);
        btnAdicionarObs.setName("btnAdicionarObs"); // NOI18N
        btnAdicionarObs.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdicionarObsActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(btnEditarObs)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnExcluirObs))
                    .addComponent(btnAdicionarObs))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAdicionarObs)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnExcluirObs)
                    .addComponent(btnEditarObs))
                .addGap(13, 13, 13))
        );

        javax.swing.GroupLayout abInfoLayout = new javax.swing.GroupLayout(abInfo);
        abInfo.setLayout(abInfoLayout);
        abInfoLayout.setHorizontalGroup(
            abInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        abInfoLayout.setVerticalGroup(
            abInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        tbDadosDoAssociado.addTab("Observações", abInfo);

        abConvenios.setBackground(resourceMap.getColor("abConvenios.background")); // NOI18N
        abConvenios.setName("abConvenios"); // NOI18N

        abConvenios1.setBackground(resourceMap.getColor("abConvenios1.background")); // NOI18N
        abConvenios1.setName("abConvenios1"); // NOI18N
        abConvenios1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        comboConvenios.setName("comboConvenios"); // NOI18N
        abConvenios1.add(comboConvenios, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 30, 201, -1));

        jLabel2.setForeground(resourceMap.getColor("jLabel2.foreground")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        abConvenios1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 30, -1, 20));

        btnContratarConvenio.setForeground(resourceMap.getColor("btnContratarConvenio.foreground")); // NOI18N
        btnContratarConvenio.setText(resourceMap.getString("btnContratarConvenio.text")); // NOI18N
        btnContratarConvenio.setBorder(null);
        btnContratarConvenio.setName("btnContratarConvenio"); // NOI18N
        btnContratarConvenio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnContratarConvenioActionPerformed(evt);
            }
        });
        abConvenios1.add(btnContratarConvenio, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 30, 61, 20));

        scrollConveniosContratados.setName("scrollConveniosContratados"); // NOI18N

        TabelaConveniosContratados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Convênio", "Empresa", "Data Inicio", "Usuário"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Object.class, java.lang.String.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        TabelaConveniosContratados.setName("TabelaConveniosContratados"); // NOI18N
        TabelaConveniosContratados.setOpaque(false);
        TabelaConveniosContratados.setShowHorizontalLines(false);
        TabelaConveniosContratados.setShowVerticalLines(false);
        scrollConveniosContratados.setViewportView(TabelaConveniosContratados);

        abConvenios1.add(scrollConveniosContratados, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 117, 480, 210));

        jLabel37.setFont(resourceMap.getFont("jLabel37.font")); // NOI18N
        jLabel37.setForeground(resourceMap.getColor("jLabel37.foreground")); // NOI18N
        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N
        abConvenios1.add(jLabel37, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, -1, -1));

        jSeparator1.setForeground(resourceMap.getColor("jSeparator1.foreground")); // NOI18N
        jSeparator1.setName("jSeparator1"); // NOI18N
        abConvenios1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 480, 10));

        javax.swing.GroupLayout abConveniosLayout = new javax.swing.GroupLayout(abConvenios);
        abConvenios.setLayout(abConveniosLayout);
        abConveniosLayout.setHorizontalGroup(
            abConveniosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 488, Short.MAX_VALUE)
            .addGroup(abConveniosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(abConveniosLayout.createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(abConvenios1, javax.swing.GroupLayout.PREFERRED_SIZE, 505, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
        abConveniosLayout.setVerticalGroup(
            abConveniosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 367, Short.MAX_VALUE)
            .addGroup(abConveniosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(abConveniosLayout.createSequentialGroup()
                    .addGap(0, 13, Short.MAX_VALUE)
                    .addComponent(abConvenios1, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 12, Short.MAX_VALUE)))
        );

        tbDadosDoAssociado.addTab("Convênios", abConvenios);

        abTitular.setBackground(resourceMap.getColor("abTitular.background")); // NOI18N
        abTitular.setName("abTitular"); // NOI18N

        txtDependenteDe.setEditable(false);
        txtDependenteDe.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtDependenteDe.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtDependenteDe.border.titleFont"), resourceMap.getColor("txtDependenteDe.border.titleColor"))); // NOI18N
        txtDependenteDe.setMaximumSize(null);
        txtDependenteDe.setMinimumSize(null);
        txtDependenteDe.setName("txtDependenteDe"); // NOI18N
        txtDependenteDe.setOpaque(false);
        txtDependenteDe.setPreferredSize(null);

        painelContatos1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("painelContatos1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("painelContatos1.border.titleFont"), resourceMap.getColor("painelContatos1.border.titleColor"))); // NOI18N
        painelContatos1.setName("painelContatos1"); // NOI18N
        painelContatos1.setOpaque(false);

        txtTelefone1Titular.setEditable(false);
        txtTelefone1Titular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtTelefone1Titular.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtTelefone1Titular.border.titleColor"))); // NOI18N
        txtTelefone1Titular.setName("txtTelefone1Titular"); // NOI18N
        txtTelefone1Titular.setOpaque(false);

        txtEmailTitular.setEditable(false);
        txtEmailTitular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtEmailTitular.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtEmailTitular.border.titleColor"))); // NOI18N
        txtEmailTitular.setName("txtEmailTitular"); // NOI18N
        txtEmailTitular.setOpaque(false);

        txtTelefone2Titular.setEditable(false);
        txtTelefone2Titular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtTelefone2Titular.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtTelefone2Titular.border.titleColor"))); // NOI18N
        txtTelefone2Titular.setName("txtTelefone2Titular"); // NOI18N
        txtTelefone2Titular.setOpaque(false);

        txtCelular1Titular.setEditable(false);
        txtCelular1Titular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCelular1Titular.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtCelular1Titular.border.titleColor"))); // NOI18N
        txtCelular1Titular.setName("txtCelular1Titular"); // NOI18N
        txtCelular1Titular.setOpaque(false);

        txtCelular2Titular.setEditable(false);
        txtCelular2Titular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCelular2Titular.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("txtCelular2Titular.border.titleColor"))); // NOI18N
        txtCelular2Titular.setName("txtCelular2Titular"); // NOI18N
        txtCelular2Titular.setOpaque(false);

        javax.swing.GroupLayout painelContatos1Layout = new javax.swing.GroupLayout(painelContatos1);
        painelContatos1.setLayout(painelContatos1Layout);
        painelContatos1Layout.setHorizontalGroup(
            painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelContatos1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelContatos1Layout.createSequentialGroup()
                        .addComponent(txtTelefone1Titular, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtTelefone2Titular, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCelular1Titular, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCelular2Titular, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtEmailTitular, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE))
                .addContainerGap())
        );
        painelContatos1Layout.setVerticalGroup(
            painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelContatos1Layout.createSequentialGroup()
                .addGroup(painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtTelefone1Titular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtTelefone2Titular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(painelContatos1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtCelular2Titular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtCelular1Titular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtEmailTitular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        txtRol.setEditable(false);
        txtRol.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtRol.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtRol.border.titleFont"), resourceMap.getColor("txtRol.border.titleColor"))); // NOI18N
        txtRol.setMaximumSize(null);
        txtRol.setName("txtRol"); // NOI18N
        txtRol.setOpaque(false);

        txtSecretaria.setEditable(false);
        txtSecretaria.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtSecretaria.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtSecretaria.border.titleFont"), resourceMap.getColor("txtSecretaria.border.titleColor"))); // NOI18N
        txtSecretaria.setMaximumSize(null);
        txtSecretaria.setName("txtSecretaria"); // NOI18N
        txtSecretaria.setOpaque(false);

        txtCategoriaVinculo.setEditable(false);
        txtCategoriaVinculo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtCategoriaVinculo.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtCategoriaVinculo.border.titleFont"), resourceMap.getColor("txtCategoriaVinculo.border.titleColor"))); // NOI18N
        txtCategoriaVinculo.setMaximumSize(null);
        txtCategoriaVinculo.setName("txtCategoriaVinculo"); // NOI18N
        txtCategoriaVinculo.setOpaque(false);

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel7.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel7.border.titleFont"), resourceMap.getColor("jPanel7.border.titleColor"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setOpaque(false);

        comboRelacaoTitular.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cônjuge", "Filho(a)", "Irmão", "Pai", "Mãe" }));
        comboRelacaoTitular.setBorder(null);
        comboRelacaoTitular.setMinimumSize(new java.awt.Dimension(49, 48));
        comboRelacaoTitular.setName("comboRelacaoTitular"); // NOI18N
        comboRelacaoTitular.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboRelacaoTitularActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(comboRelacaoTitular, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(263, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(comboRelacaoTitular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout abTitularLayout = new javax.swing.GroupLayout(abTitular);
        abTitular.setLayout(abTitularLayout);
        abTitularLayout.setHorizontalGroup(
            abTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abTitularLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(abTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtDependenteDe, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE)
                    .addComponent(painelContatos1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(abTitularLayout.createSequentialGroup()
                        .addComponent(txtRol, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtSecretaria, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCategoriaVinculo, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE))
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        abTitularLayout.setVerticalGroup(
            abTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abTitularLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtDependenteDe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(abTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(abTitularLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtRol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(abTitularLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(abTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSecretaria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtCategoriaVinculo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(painelContatos1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(51, Short.MAX_VALUE))
        );

        tbDadosDoAssociado.addTab(resourceMap.getString("abTitular.TabConstraints.tabTitle"), abTitular); // NOI18N

        abHistorico.setBackground(resourceMap.getColor("abHistorico.background")); // NOI18N
        abHistorico.setName("abHistorico"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Data", "Ação", "Usuário"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable3.setName("jTable3"); // NOI18N
        jScrollPane4.setViewportView(jTable3);
        jTable3.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jTable3.columnModel.title0")); // NOI18N
        jTable3.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jTable3.columnModel.title1")); // NOI18N
        jTable3.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jTable3.columnModel.title2")); // NOI18N

        javax.swing.GroupLayout abHistoricoLayout = new javax.swing.GroupLayout(abHistorico);
        abHistorico.setLayout(abHistoricoLayout);
        abHistoricoLayout.setHorizontalGroup(
            abHistoricoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(abHistoricoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE)
                .addContainerGap())
        );
        abHistoricoLayout.setVerticalGroup(
            abHistoricoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, abHistoricoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
                .addContainerGap())
        );

        tbDadosDoAssociado.addTab("Histórico", abHistorico);

        pnEsquerdo.setName("pnEsquerdo"); // NOI18N
        pnEsquerdo.setOpaque(false);

        txtRolDependente.setEditable(false);
        txtRolDependente.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtRolDependente.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtRolDependente.border.titleFont"), resourceMap.getColor("txtRolDependente.border.titleColor"))); // NOI18N
        txtRolDependente.setName("txtRolDependente"); // NOI18N
        txtRolDependente.setOpaque(false);

        txtSituacao.setEditable(false);
        txtSituacao.setText(resourceMap.getString("txtSituacao.text")); // NOI18N
        txtSituacao.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtSituacao.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtSituacao.border.titleFont"), resourceMap.getColor("txtSituacao.border.titleColor"))); // NOI18N
        txtSituacao.setName("txtSituacao"); // NOI18N
        txtSituacao.setOpaque(false);

        lblFoto.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lblFoto.setName("lblFoto"); // NOI18N

        txtDataFiliacao.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtDataFiliacao.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtDataFiliacao.border.titleFont"), resourceMap.getColor("txtDataFiliacao.border.titleColor"))); // NOI18N
        try {
            txtDataFiliacao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtDataFiliacao.setText(resourceMap.getString("txtDataFiliacao.text")); // NOI18N
        txtDataFiliacao.setName("txtDataFiliacao"); // NOI18N
        txtDataFiliacao.setOpaque(false);

        txtLocFisica.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("txtLocFisica.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("txtLocFisica.border.titleFont"), resourceMap.getColor("txtLocFisica.border.titleColor"))); // NOI18N
        try {
            txtLocFisica.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("'A##-G##'-P##.#")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtLocFisica.setToolTipText(resourceMap.getString("txtLocFisica.toolTipText")); // NOI18N
        txtLocFisica.setName("txtLocFisica"); // NOI18N
        txtLocFisica.setOpaque(false);

        btnFoto.setText(resourceMap.getString("btnFoto.text")); // NOI18N
        btnFoto.setName("btnFoto"); // NOI18N
        btnFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnEsquerdoLayout = new javax.swing.GroupLayout(pnEsquerdo);
        pnEsquerdo.setLayout(pnEsquerdoLayout);
        pnEsquerdoLayout.setHorizontalGroup(
            pnEsquerdoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnEsquerdoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnEsquerdoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(txtDataFiliacao, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(txtSituacao, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(txtRolDependente, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(txtLocFisica, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                    .addComponent(btnFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnEsquerdoLayout.setVerticalGroup(
            pnEsquerdoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnEsquerdoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblFoto, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFoto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtRolDependente, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtDataFiliacao, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtLocFisica, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        bfInferior.setFloatable(false);
        bfInferior.setName("bfInferior"); // NOI18N
        bfInferior.setOpaque(false);

        btnSalvar.setIcon(resourceMap.getIcon("btnSalvar.icon")); // NOI18N
        btnSalvar.setText(resourceMap.getString("btnSalvar.text")); // NOI18N
        btnSalvar.setFocusable(false);
        btnSalvar.setName("btnSalvar"); // NOI18N
        btnSalvar.setOpaque(false);
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        bfInferior.add(btnSalvar);

        btnEditar.setIcon(resourceMap.getIcon("btnEditar.icon")); // NOI18N
        btnEditar.setText(resourceMap.getString("btnEditar.text")); // NOI18N
        btnEditar.setFocusable(false);
        btnEditar.setName("btnEditar"); // NOI18N
        btnEditar.setOpaque(false);
        bfInferior.add(btnEditar);

        btnAtivaInativa.setIcon(resourceMap.getIcon("btnAtivaInativa.icon")); // NOI18N
        btnAtivaInativa.setText(resourceMap.getString("btnAtivaInativa.text")); // NOI18N
        btnAtivaInativa.setName("btnAtivaInativa"); // NOI18N
        btnAtivaInativa.setOpaque(false);
        btnAtivaInativa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAtivaInativaActionPerformed(evt);
            }
        });
        bfInferior.add(btnAtivaInativa);

        btnImprimir.setIcon(resourceMap.getIcon("btnImprimir.icon")); // NOI18N
        btnImprimir.setText(resourceMap.getString("btnImprimir.text")); // NOI18N
        btnImprimir.setFocusable(false);
        btnImprimir.setMaximumSize(new java.awt.Dimension(80, 33));
        btnImprimir.setMinimumSize(new java.awt.Dimension(80, 33));
        btnImprimir.setName("btnImprimir"); // NOI18N
        btnImprimir.setOpaque(false);
        btnImprimir.setPreferredSize(new java.awt.Dimension(67, 33));
        btnImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirActionPerformed(evt);
            }
        });
        bfInferior.add(btnImprimir);

        javax.swing.GroupLayout PainelPrincipalLayout = new javax.swing.GroupLayout(PainelPrincipal);
        PainelPrincipal.setLayout(PainelPrincipalLayout);
        PainelPrincipalLayout.setHorizontalGroup(
            PainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(PainelPrincipalLayout.createSequentialGroup()
                .addComponent(pnEsquerdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(PainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(bfInferior, javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE)
                    .addComponent(tbDadosDoAssociado, javax.swing.GroupLayout.PREFERRED_SIZE, 493, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        PainelPrincipalLayout.setVerticalGroup(
            PainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PainelPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(tbDadosDoAssociado, 0, 0, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(bfInferior, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(pnEsquerdo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(PainelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(PainelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed
        salvarDependente();
    }//GEN-LAST:event_btnSalvarActionPerformed

    private void comboUFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboUFActionPerformed
        try {
            configurarComboCidade();
        } catch (SQLException ex) {
            Logger.getLogger(TelaDependente.class.getName()).log(Level.SEVERE, null, ex);
        }        // TODO add your handling code here:
}//GEN-LAST:event_comboUFActionPerformed

    private void tabelaObservacaoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaObservacaoMouseClicked
        selecionarObservacao();
}//GEN-LAST:event_tabelaObservacaoMouseClicked

    private void btnEditarObsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditarObsActionPerformed
        txtObservacao.setEditable(true);
        txtObservacao.setBackground(Color.white);
        btnAdicionarObs.setText("Alterar");
}//GEN-LAST:event_btnEditarObsActionPerformed

    private void btnExcluirObsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExcluirObsActionPerformed
        ExcluirObservacao();
}//GEN-LAST:event_btnExcluirObsActionPerformed

    private void btnContratarConvenioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnContratarConvenioActionPerformed
        chamarAdesaoConvenio();
}//GEN-LAST:event_btnContratarConvenioActionPerformed

    private void btnAdicionarObsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdicionarObsActionPerformed
        AcoesBtnAdicionarObservacao();
    }//GEN-LAST:event_btnAdicionarObsActionPerformed

    private void btnImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirActionPerformed
        
    }//GEN-LAST:event_btnImprimirActionPerformed

    private void comboSexoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboSexoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_comboSexoActionPerformed

    private void comboRelacaoTitularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboRelacaoTitularActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_comboRelacaoTitularActionPerformed

    private void btnFotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFotoActionPerformed
        procurarFoto();
    }//GEN-LAST:event_btnFotoActionPerformed

    private void btnAtivaInativaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAtivaInativaActionPerformed
        ativaInativa();
    }//GEN-LAST:event_btnAtivaInativaActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PainelPrincipal;
    public javax.swing.JTable TabelaConveniosContratados;
    private javax.swing.JPanel abConvenios;
    private javax.swing.JPanel abConvenios1;
    private javax.swing.JPanel abDadosPessoais;
    private javax.swing.JPanel abEnderecoContatos;
    private javax.swing.JPanel abHistorico;
    private javax.swing.JPanel abInfo;
    private javax.swing.JPanel abTitular;
    private javax.swing.JToolBar bfInferior;
    private javax.swing.JButton btnAdicionarObs;
    private javax.swing.JButton btnAtivaInativa;
    private javax.swing.JButton btnContratarConvenio;
    private javax.swing.JButton btnEditar;
    private javax.swing.JButton btnEditarObs;
    private javax.swing.JButton btnExcluirObs;
    private javax.swing.JButton btnFoto;
    private javax.swing.JButton btnImprimir;
    private javax.swing.JButton btnSalvar;
    private javax.swing.JComboBox comboCidade;
    private javax.swing.JComboBox comboConvenios;
    private javax.swing.JComboBox comboRelacaoTitular;
    private javax.swing.JComboBox comboSexo;
    private javax.swing.JComboBox comboUF;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTable jTable3;
    private javax.swing.JLabel lblFoto;
    private javax.swing.JPanel painelContatos;
    private javax.swing.JPanel painelContatos1;
    private javax.swing.JPanel painelEndereco;
    private javax.swing.JPanel pnEsquerdo;
    private javax.swing.JScrollPane scrollConveniosContratados;
    private javax.swing.JTable tabelaObservacao;
    private javax.swing.JTabbedPane tbDadosDoAssociado;
    private javax.swing.JTextField txtBairro;
    private javax.swing.JTextField txtCategoriaVinculo;
    private javax.swing.JFormattedTextField txtCelular1;
    private javax.swing.JTextField txtCelular1Titular;
    private javax.swing.JFormattedTextField txtCelular2;
    private javax.swing.JTextField txtCelular2Titular;
    private javax.swing.JFormattedTextField txtCep;
    private javax.swing.JTextField txtComplemento;
    private javax.swing.JFormattedTextField txtCpf;
    private javax.swing.JFormattedTextField txtDataFiliacao;
    private javax.swing.JTextField txtDependenteDe;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtEmailTitular;
    private javax.swing.JTextField txtIdentidade;
    private javax.swing.JFormattedTextField txtLocFisica;
    private javax.swing.JTextField txtLogradouro;
    private javax.swing.JTextField txtNacionalidade;
    private javax.swing.JFormattedTextField txtNascimento;
    private javax.swing.JTextField txtNaturalidade;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtNomeMae;
    private javax.swing.JTextField txtNomePai;
    private javax.swing.JTextField txtNumero;
    private javax.swing.JTextArea txtObservacao;
    private javax.swing.JTextField txtOrgaoExepedidor;
    private javax.swing.JTextField txtRol;
    private javax.swing.JTextField txtRolDependente;
    private javax.swing.JTextField txtSecao;
    private javax.swing.JTextField txtSecretaria;
    private javax.swing.JTextField txtSituacao;
    private javax.swing.JFormattedTextField txtTelefone1;
    private javax.swing.JTextField txtTelefone1Titular;
    private javax.swing.JFormattedTextField txtTelefone2;
    private javax.swing.JTextField txtTelefone2Titular;
    private javax.swing.JTextField txtTitulo;
    private javax.swing.JTextField txtZona;
    // End of variables declaration//GEN-END:variables
}
